﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MK_Movie_Manager
{
    public partial class TextInputDialog : Form
    {
        public TextInputDialog()
        {
            InitializeComponent();
        }

        private void btnBrowse_Click(object sender, EventArgs e)
        {
            if (TIDOpenFile.ShowDialog().Equals(DialogResult.OK))
                this.tbPath.Text = TIDOpenFile.FileName;                           
        }
        
        public static DialogResult ShowCustomDialog(out string ImgFilePath)
        {
            TextInputDialog dialog = new TextInputDialog();           
            var dg= dialog.ShowDialog();
            if (dg.Equals(DialogResult.OK))
                ImgFilePath = dialog.tbPath.Text;
            else
                ImgFilePath = string.Empty;
            return dg;
        }
    }
}
